<template>
  <div class="tbl">
    <div class="iptbox">
      <el-input v-model="input" placeholder="客户姓名/联系电话"></el-input>

      <el-select v-model="value" placeholder="请选择状态">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>

      <el-select v-model="value" placeholder="请选择销售人员">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>

      <el-button type="primary">查询</el-button>
    </div>

    <el-table :data="tableData" border style="width: 100%">
      <el-table-column fixed prop="date" label="报备日期" width="150">
      </el-table-column>
      <el-table-column prop="name" label="客户姓名" width="120">
      </el-table-column>
      <el-table-column prop="province" label="性别" width="120">
      </el-table-column>
      <el-table-column prop="city" label="客户地址" width="120">
      </el-table-column>
      <el-table-column prop="address" label="联系电话" width="300">
      </el-table-column>
      <el-table-column prop="zip" label="最后跟进日期" width="120">
      </el-table-column>
      <el-table-column prop="zip" label="客户来源" width="120">
      </el-table-column>
      <el-table-column prop="zip" label="状态" width="120"> </el-table-column>
      <el-table-column prop="zip" label="成交日期" width="120">
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small"
            >跟进</el-button
          >
          <el-button type="text" size="small">编辑</el-button>
          <el-button type="text" size="small">指派</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <div class="block">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input: "",
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1517 弄",
          zip: 200333,
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1519 弄",
          zip: 200333,
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1516 弄",
          zip: 200333,
        },
      ],
      options: [
        {
          value: "选项1",
          label: "黄金糕",
        },
        {
          value: "选项2",
          label: "双皮奶",
        },
        {
          value: "选项3",
          label: "蚵仔煎",
        },
        {
          value: "选项4",
          label: "龙须面",
        },
        {
          value: "选项5",
          label: "北京烤鸭",
        },
      ],
      value: "",
      currentPage1: 5,
      currentPage2: 5,
      currentPage3: 5,
      currentPage4: 4,
    };
  },
  methods: {
    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script >
    
<style lang="less" scoped>
.tbl {
  width: 82%;
  margin: 0 auto;

  .iptbox {
    display: flex;
    justify-content: space-between;
    .el-input {
      margin-right: 80px;
      margin-top: 20px;
      margin-bottom: 20px;
      width: 20%;
    }
    .el-select {
      margin-right: 80px;
      margin-top: 20px;
      margin-bottom: 20px;
    }
    .el-button {
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
  .block {
    text-align: center;
    margin-top: 30px;
  }
}
</style>